package com.rd.student.ruanjian.class4.lichunquan.Text02;

import java.util.ArrayList;

public class Test05 {
    //去重
    public static void main(String[] args) {
        ArrayList arrayList = new ArrayList();
        String[] strs = {"12345",
                "67891",
                "123478099",
                "9876543",
                "67891",
                "12347809933",
                "12809933",
                "12347809933111",
                "9876543",
                "12809933"};
        arrayList.add(strs[0]);
        for (int i = 1; i < strs.length; i++) {
            for (int j = 0; j < arrayList.size(); j++) {
                if (strs[i] == arrayList.get(j)) {
                    break;
                } else if (strs[i] != arrayList.get(j) && j == arrayList.size() - 1) {
                    arrayList.add(strs[i]);
                }
            }

        }
        System.out.println(arrayList);
    }
}
